package generics.and.colecctions.ordenacion.comparable;

import java.util.Set;
import java.util.TreeSet;

public class ClaseTestComparable {

	public static void main(String[] args) {

		ClaseImplementaComparable cic = new ClaseImplementaComparable();
		cic.setNum(6);
		ClaseImplementaComparable cic2 = new ClaseImplementaComparable();
		cic2.setNum(4);

		Set<ClaseImplementaComparable> t = new TreeSet<ClaseImplementaComparable>();
		t.add(cic);
		t.add(cic2);

		for (ClaseImplementaComparable claseImplementaComparable : t) {
			System.out.println(claseImplementaComparable.getNum());
		}
	}

}
